﻿using ContactSMS.Domain;
using ContactSMS.Domain.Entity;
using ContactSMS.Infrastructure.dbContexts;

namespace ContactSMS.Infrastructure
{
    public class LoginRepository : ILoginRepository
    {
        private readonly ContactDbContexts _contactDbContexts;

        public LoginRepository(ContactDbContexts contactDbContexts)
        {
            this._contactDbContexts = contactDbContexts;
        }

        public Task<User> LoginAsync(User User)
        {
            throw new NotImplementedException();
        }

        public async Task<User> RegisterAsync(User User)
        {
            await this._contactDbContexts.Users.AddAsync(User);
            await this._contactDbContexts.SaveChangesAsync();
            return User;
        }
    }
}
